<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="service.*,pojo.*,java.util.*" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
		<table border="2">
			<tr>
				<th>订单编号</th>
				<th>用户名</th>
				<th>订单状态</th>
				<th>地址</th>
				<th>支付时间</th>
				<th>金额</th>
			</tr>
<% 
	Customer cu=(Customer)session.getAttribute("c");
	OrderService service=new OrderService();
	if(cu!=null){
		ArrayList<Order> list=service.getOrders(cu.getC_name());
		%>
		<%
			for(int x=0;x<list.size();x++){
				Order order=list.get(x);
		%>
			<tr>
				<td><%=order.getOrder_id() %></td>
				<td><%=order.getUser_id() %></td>
				<td><%=order.getOrder_state() %></td>
				<td><%=order.getUseraddid() %></td>
				<td><%=order.getOrdertime() %></td>
				<td><%=order.getPay() %></td>		
			</tr>
		
		<%
			}
	}
%>
		</table>
</body>
</html>